// ImageFormatDlg.cpp : implementation file
//

#include "stdafx.h"
#include "CameraDLL.h"
#include "ImageFormatDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CImageFormatDlg dialog


CImageFormatDlg::CImageFormatDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CImageFormatDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CImageFormatDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT

	m_nImageFormat = 0;
}


void CImageFormatDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CImageFormatDlg)
	DDX_Control(pDX, IDC_COMBO1, m_comboImageFormat);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CImageFormatDlg, CDialog)
	//{{AFX_MSG_MAP(CImageFormatDlg)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CImageFormatDlg message handlers

void CImageFormatDlg::OnButton1() 
{
	CString tFilePath = "F:\\11.bmp";
	Bitmap a(tFilePath.AllocSysString());
	tFilePath.Format("%d,%d",a.GetWidth(),a.GetHeight());
	AfxMessageBox(tFilePath);
}

BOOL CImageFormatDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();

	//this->m_comboImageFormat

	this->m_comboImageFormat.SetCurSel(0);
	m_nImageFormat=0;
	
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CImageFormatDlg::OnSelchangeCombo1() 
{
	m_nImageFormat = this->m_comboImageFormat.GetCurSel();
	
}
